#include"../../include/ClinetLoop.h"
#include"../../include/ConfigFile.h"
#include"../../include/TextColor.h"
#include<iostream>
using namespace std;

void guiIcon() {
    Color c;
    cout << endl;
    cout << endl;
    cout << c.blue;
    cout << " _____             _    _                         _" << endl;            
    cout << "|  __ \\           | |  (_)                       (_)" << endl;           
    cout << "| |__) |___   ___ | | _ _  ___    ___ _ __   __ _ _ _ __   ___" << endl; 
    cout << "|  _  // _ \\ / _ \\| |/ | |/ _ \\  / _ | '_ \\ / _` | | '_ \\ / _ \\" << endl;
    cout << "| | \\ | (_) | (_) |   <| |  __/ |  __| | | | (_| | | | | |  __/" << endl;
    cout << "|_|  \\_\\___/ \\___/|_|\\_|_|\\___|  \\___|_| |_|\\__, |_|_| |_|\\___|" << endl;
    cout << "                                             __/ |" << endl;             
    cout << "                                            |___/" << endl; 
    cout << c.isback;             
    cout << endl;
    cout << endl;
}

int main() {
    guiIcon();
    ConfigFile *confPtr = ConfigFile::getInstance();
    string ip = confPtr->getConf()["ip"];
    unsigned short port = atoi(confPtr->getConf()["port"].c_str());
    ClinetLoop loop(ip,port);
    loop.start();
    return 0;
}
